<!--
产量及耗用量录入
-->
<ion-header>
  <ion-navbar color="headerColor">
    <ion-title>耗用 / 产量</ion-title>
  </ion-navbar>
</ion-header>


<ion-content padding class="bg-color">
  <div style="font-size: 1.2rem;text-align: center">
    <label>班长：</label>
    <span>{{personName}}</span>
    <label>班组日期：</label>
    <span>{{bzDate}}</span>
    <label>班组：</label>
    <span>{{bzSelect}}</span>
    <label>工序：</label>
    <span>{{workProcedureName}}</span>
  </div>

  <div style="margin-top: 3%" class="tableWrap">
    <table class="table-thead">
      <colgroup>
        <col width="4%">
        <col width="20%">
        <col width="32%">
        <col width="8%">
        <col *ngFor="let h of codeNameMap" width="{{36/codeNameMap.length}}%">
      </colgroup>
      <thead>
      <tr>
        <th>序号</th>
        <th>物料编码</th>
        <th>物料名称</th>
        <th>单位</th>
        <th *ngFor="let h of codeNameMap">{{h.name}}</th>
      </tr>
      </thead>
    </table>

    <div class="comTbody">
      <table class="table-tbody" style="border-top: 0;">
        <colgroup>
          <col width="4%">
          <col width="20%">
          <col width="32%">
          <col width="8%">
          <col *ngFor="let h of codeNameMap" width="{{36/codeNameMap.length}}%">
        </colgroup>
        <tbody>
        <tr *ngFor="let item of dataList;let i=index" id="{{item.id}}">
          <td>{{i+1}}</td>
          <td>{{item.material_code}}</td>
          <td>{{item.material_name}}</td>
          <td>{{item.material_unit_t}}</td>
          <td *ngFor="let h of item.codeNameMap">
            <input value="{{h.val}}" type="number" class="input" id="{{item.material_code}}{{h.code}}Con"
                   (change)="inputChange(item.id,item.material_code,h.code)">
          </td>
        </tr>
        </tbody>
      </table>
    </div>
  </div>

  <div style="text-align: center;margin-top: 2%;">
    <button ion-button class="btn" (click)="submitBtn()">
      提交
    </button>
    <button ion-button class="btn" style="margin-left: 10%" (click)="resetBtn()">
      清空
    </button>
  </div>
</ion-content>
